package level.state;

import core.Constants;

/*
 * Data class for the tile. Main data structure for the background, foreground,
 * and other painted layers. Will almost always go into an ArrayList<Tile>.
 */

public class Tile implements Modifiable
{
	private String iconPath;
	private int x;
	private int y;
	private int w;
	private int h;
	private int sx;
	private int sy;
	private int sw;
	private int sh;

	public Tile()
	{
		iconPath = null;
		x = 0;
		y = 0;
		w = (int) Constants.TILE_SIZE;
		h = (int) Constants.TILE_SIZE;
		sx = 0;
		sy = 0;
		sw = (int) Constants.TILE_SIZE;
		sh = (int) Constants.TILE_SIZE;
	}

	public Tile cloneTile()
	{
		Tile ti = new Tile();
		ti.setX(this.x);
		ti.setY(this.y);
		ti.setW(this.w);
		ti.setH(this.h);
		ti.setSx(this.sx);
		ti.setSy(this.sy);
		ti.setSw(this.sw);
		ti.setSh(this.sh);
		ti.setIconPath(this.iconPath);
		return ti;
	}

	public String getIconPath()
	{
		return iconPath;
	}

	public void setIconPath(String iconPath)
	{
		this.iconPath = iconPath;
	}

	public int getX()
	{
		return x;
	}

	public void setX(int x)
	{
		this.x = x;
	}

	public int getY()
	{
		return y;
	}

	public void setY(int y)
	{
		this.y = y;
	}

	public int getW()
	{
		return w;
	}

	public void setW(int w)
	{
		this.w = w;
	}

	public int getH()
	{
		return h;
	}

	public void setH(int h)
	{
		this.h = h;
	}

	public int getSx()
	{
		return sx;
	}

	public void setSx(int sx)
	{
		this.sx = sx;
	}

	public int getSy()
	{
		return sy;
	}

	public void setSy(int sy)
	{
		this.sy = sy;
	}

	public int getSw()
	{
		return sw;
	}

	public void setSw(int sw)
	{
		this.sw = sw;
	}

	public int getSh()
	{
		return sh;
	}

	public void setSh(int sh)
	{
		this.sh = sh;
	}
}
